<table border="0" cellpadding="0" cellspacing="0">
<?if(count($this->groups['active'])) {?>
<tr>
    <td valign="top">
        <b><?=$this->translate('Lisening')?></b> &nbsp;
    </td>
    <td valign="top">
    <table class="group-list" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <?$i = 0; foreach($this->groups['active'] as $type => $value) {?>
        <?if($i % $this->cols == 0 && $i != 0) {?>
            </tr>
            <tr>
        <? } ?>
        <td>
            <input type="checkbox" name="<?=$this->name?>[]" value="<?=$value->id?>"> <?=$value->name?>
        </td>
    <? $i++;} ?>
     </table>
    </td>
</tr>
<? } ?>
    </td>
</tr>

<?if(count($this->groups['ended'])) {?>
        <tr>
            <td>&nbsp;</td>
        </tr>
        <td valign="top">
            <b><?=$this->translate('Ended')?></b> &nbsp;
        </td>
        <td valign="top">
        <table class="group-list" border="0" cellpadding="0">
            <tr>
            <?$i = 0; foreach($this->groups['ended'] as $type => $value) {?>
                <?if($i % $this->cols == 0 && $i != 0) {?>
                    </tr>
                    <tr>
                <? } ?>
                <td>
                    <input type="checkbox" name="<?=$this->name?>[]" value="<?=$value->id?>"> <?=$value->name?>
                </td>
            <?$i++; } ?>
        </table>
        </td>
<? } ?>

</table>
<p>